<form class="layui-form">
	<div class="layui-form-item">
		<label class="layui-form-label">标题</label>
		<div class="layui-input-block">
			<input type="text" name="title" lay-verify="required" value="{$list.title}" placeholder="请输入标题" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">短标题</label>
		<div class="layui-input-block">
			<input type="text" name="short" placeholder="短标题" value="{$list.short}" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">分类</label>
		<div class="layui-input-inline">
			<select name="cid" id="cid" default="{$list['cid']},{$list['path']}" lay-verify="required">
	    	<option value="">==请选择==</option>
	        {volist name="cate" id="vo"}
	        <option value="{$vo['id']},{$vo['path']}">{php}
	            for($i=0; $i<$vo['count']*2; $i++){
	               echo '&nbsp;&nbsp;';            
	            }
	        {/php}{$vo['name']}</option>
	        {/volist}
	        </select>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">站外链接</label>
		<div class="layui-input-block">
			<input type="text" name="url" lay-verify="_url" value="{$list.url}" class="layui-input">
		</div>
	</div>	

	<div class="layui-form-item">
		<label class="layui-form-label">缩略图</label>
		<div class="layui-inline">

			<img class="thumb" id="picname_src" src="{eq name="list.picname" value=""}{:RES}/image/image.jpg{else/}{$list.picname}{/eq}" />
			<input type="hidden" name="picname" id="picname" value="{$list.picname}" />
		</div>
		<div class="layui-inline">
			<button type="button"  class="layui-btn" function="upload" fileElem="#picname" srcElem="#picname_src" fileAccept="images" fileExts="jpg|png|gif|jpeg" fileSize="5120" inputs="type:test">上传图片</button>

			<input type="button" value="删除" class="layui-btn layui-btn-small" onclick="delImage('picname')"/>
		</div>
		<div class="layui-inline">
			<input type="checkbox" lay-skin="primary" name="exp" id="exp" value="1" title="以正文第一张为缩略图">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">属性</label>
		<div class="layui-input-block">
			<input type="checkbox" name="flash" id="flash" value="1" title="幻灯" {php}if($list['flash']=='1')echo 'checked';{/php}>
			<input type="checkbox" name="comm" value="1" title="推荐" {php}if($list['comm']=='1')echo 'checked';{/php}>
			<input type="checkbox" name="top" value="1" title="置顶" {php}if($list['top']=='1')echo 'checked';{/php}>
			<input type="checkbox" name="bold" value="1" title="加粗" {php}if($list['bold']=='1')echo 'checked';{/php}>
			<input type="checkbox" name="red" value="1" title="套红" {php}if($list['red']=='1')echo 'checked';{/php}>
		</div>
	</div>

	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">发布日期</label>
			<div class="layui-input-inline">
				<input type="text" name="createTime" value="{$list['createTime']}" placeholder="yyyy-mm-dd" autocomplete="off" class="layui-input fsDate" dateType="date"/>
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">来源</label>
			<div class="layui-input-block">
				<input type="text" name="from" autocomplete="off" class="layui-input" value="{$list['from']}" />
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">作者</label>
			<div class="layui-input-block">
				<input type="text" name="author" autocomplete="off" class="layui-input" value="{$list['author']}" />
			</div>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">关键词</label>
		<div class="layui-input-block">
			<input type="text" name="keyword" class="layui-input" value="{$list['keyword']}">
		</div>
	</div>	

	<div class="layui-form-item">
		<label class="layui-form-label">排序</label>
		<div class="layui-input-block">
			<input type="text" name="sort" id="sort" value="{$list['sort']}" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">描述</label>
		<div class="layui-input-block">
			<textarea name="intr" class="layui-textarea">{$list.intr}</textarea>
		</div>
	</div>

	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">正文</label>
		<div class="layui-input-block">
			<textarea name="content" id="container">{$list['content']}</textarea>
			<script type="text/javascript" src="{:config('UE_CONFIG.uedir')}/my.config.js"></script>
			<script type="text/javascript" src="{:config('UE_CONFIG.uedir')}/ueditor.all.min.js"></script>
			<script type="text/javascript" src="{:config('UE_CONFIG.uedir')}/lang/zh-cn/zh-cn.js"></script>
			<script type="text/javascript">
			var editor = UE.getEditor('container');
			</script>
		</div>
	</div>	

	<hr>

	<div class="layui-form-item">
		<label class="layui-form-label"></label>
     	<button id="subBtn" class="layui-btn" lay-submit="" lay-filter="edit" url="{:url('Article/edit')}"><i class="layui-icon">&#xe642;</i>编辑</button>

     	<button type="button" class="layui-btn layui-btn-primary" id="tempBtn">保存为草稿</button>

     	<button type="button" class="layui-btn layui-btn-primary" function="close">关闭</button>
    </div>	
	<input type="hidden" name="id" value="{$list['id']}" />
	<input type="hidden" name="status" id="status" value="1">
</form>

<script>
$(function(){
	$("#tempBtn").click(function(){
		$("#status").val("0");
		$("#subBtn").click();
	});
})
</script>